package com.demo2do.cda.admin.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.demo2do.cda.admin.entity.security.Login;
import com.demo2do.cda.admin.web.resolver.Secure;

/**
 * 
 * @author Wilson
 * 
 */
@Controller
public class HomeController {
    
    /**
     * 
     * @param login
     * @return
     */
    @RequestMapping("/home")
    public String home(@Secure Login login) {
        return "redirect:/profile";
    }
    
    /**
     * 
     * @return
     */
    @RequestMapping("/example")
    public String exapmle() {
        return "home";
    }
    
    /**
     * 
     * @return
     */
    @RequestMapping("/example/detail")
    public String detail() {
        return "detail";
    }
    
    /**
     * 
     * @return
     */
    @RequestMapping("/list")
    public String list() {
        return "list";
    }
    
    /**
     * 
     * @return
     */
    @RequestMapping("/principal")
    public String principal() {
        return "redirect:/principals";
    }
}
